import numpy as np

a = np.arange(24)
print(a.ndim)
print(a)

b = a.reshape(2, 4, 3)
print(b.ndim)
print(b)
print(b.shape)

a = np.array([[1, 2, 3], [4, 5, 6]])
print(a.shape)

# ndarray.itemsize 以字节的形式返回数组中每一个元素的大小。
c = np.array([1, 2, 3, 4, 5], dtype=np.int8)
print(c.itemsize)
c = np.array([1, 2, 3, 4, 5], dtype=np.float64)
print(c.itemsize)

print(c.flags)
